<!doctype html>
<html>
    <head>
        <!-- meta -->
        <!-- meta -->
        <title>API</title>
        <!-- css -->
        <link href="../styles/examples.css" rel="stylesheet"/>
        <link href="../../source/styles/nova.common.css" rel="stylesheet"/>
        <link href="../../source/styles/nova.css" rel="stylesheet"/>
        <!-- css -->
        <!-- script -->
        <script src="../js/jquery.js"></script>
        <script src="../../source/js/nova.core.js"></script>
        <script src="../../source/js/nova.upload.js"></script>
        <!-- script -->
    </head>
    <body>
        <!-- nav -->
        <!-- nav -->
        <!-- description -->
        <!-- description -->
        <div id="example" class="n-content">
            <div class="configuration">
                <span class="configHead">Configuration</span>
                <span class="configTitle">API Functions</span>
                <ul class="options">
                    <li>
                        <button class="toggleEnabled n-button">Toggle enabled state</button>
                    </li>
                    <li>
                        <button class="enable n-button">Enable</button>
                    </li>
                    <li>
                        <button class="disable n-button">Disable</button>
                    </li>
                </ul>
                <span class="infoHead">Information</span>
                <p>
                    <strong>Note:</strong>
                    Security restrictions in Chrome prevent this
                    example from working when the page is
                    loaded from the file system (via file:// protocol).
                </p>
            </div>
            <form method="post" style="width:60%">
                <div>
                    <input name="files" id="files" type="file" />
                </div>
            </form>
            <script>
                function getUpload() {
                    return $("#files").data("novaUpload");
                }
                $(document).ready(function() {
                    $("#files").novaUpload();

                    $(".toggleEnabled").click(function() {
                        getUpload().toggle();
                    });

                    $(".enable").click(function() {
                        getUpload().enable();
                    });

                    $(".disable").click(function() {
                        getUpload().disable();
                    });
                });
            </script>
        </div>
        <!-- tools -->
        <!-- tools -->
    </body>
</html>

